{
	template:`
	<a-page-header title="商品信息"  >
		<template #extra>
			<a-button type="primary" @click="save">保存</a-button>
			<m-back @click="back(false);">关闭</m-back>
		</template>
		<a-card :hoverable="true" :bodyStyle="{padding:'20px 20px 0'}">
			<a-form class="index-form" :wrapper-col="{span:24}">
				<a-row :gutter="10">
					<a-col :span="8">
						<a-form-item label="类型" class="index-form-item">
							<a-select v-model:value="model.type.oid" placeholder="请选择类型" :options="dictOptions('m.member.manage.model.ServeType')" show-search :filter-option="selectFilter"/>
						</a-form-item>
					</a-col>
					<a-col :span="16">
						<a-form-item label="标题" class="index-form-item">
							<a-input v-model:value="model.title" placeholder="请输入标题"/>
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="单价" class="index-form-item">
							<a-input-number v-model:value="model.price" placeholder="请输入单价" addon-after="元" :precision="2" />
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="优惠比例" class="index-form-item">
							<a-input-number v-model:value="model.discount" placeholder="请输入优惠比例" addon-after="%" :max="100" :min="0" :precision="0" />
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="优惠后" class="index-form-item">
							{{formatNumber(model.price*(100-model.discount)/100,"#,##0.00")}}元
						</a-form-item>
					</a-col>
					<a-col :span="24">
						<a-form-item label="描述" class="index-form-item">
							<a-textarea v-model:value="model.description" placeholder="请输入描述" auto-size/>
						</a-form-item>
					</a-col>
				</a-row>
			</a-form>
		</a-card>
	</a-page-header>
	`,
	props: ['localeZh','param','parentVue'],
	data:function(){
		return {
			model:{"level":{},"type":{}}
		};
	},
	mounted(){
	    this.model=this.param.model;
	},
	methods:{
		save:function(){
			this.requestData('action/member/manage/serveGoods/doSave',
				{model:this.model},
				data=>{
					if(!data.code){
						this.$message.success(data.msg);
						this.back(true);
					}else{
						this.$message.error(data.msg);
					}
				}
			);
		},
	}
}